package com.karaoke.android.kege.fragment


import android.os.Bundle
import android.support.v4.app.Fragment
import com.karaoke.android.data.domain.DataDictionary
import com.karaoke.android.kege.BR
import com.karaoke.android.kege.R
import com.karaoke.android.kege.vm.CategoryDetailViewModel
import com.karaoke.android.library.mvvm.BindingConfig
import kotlin.properties.Delegates


/**
 * A simple [Fragment] subclass.
 */
class CategoryDetailFragment : BaseFragment<CategoryDetailViewModel>()
{
    override val viewModel: CategoryDetailViewModel by lazy { CategoryDetailViewModel(this) }

    override val config: BindingConfig by lazy { BindingConfig(R.layout.fragment_category_detail, BR.viewModel) }

    var category: DataDictionary by Delegates.notNull()

    override fun onCreate(savedInstanceState: Bundle?)
    {
        super.onCreate(savedInstanceState)
        category = arguments.getParcelable("dict")
        viewModel.category = category
        title = category.name
    }
}// Required empty public constructor
